package cn.itsource.order.mapper;


import cn.itsource.basic.util.LoginInfoUtil;
import cn.itsource.order.domain.OrderAddress;
import cn.itsource.order.domain.UserAddress;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

public interface UserAddressMapper extends Mapper<UserAddress> {

    default List<UserAddress> findUserAddresses(){

        Example example = new Example(UserAddress.class);
        example.and().andEqualTo("userId", LoginInfoUtil.getUserId());

        return this.selectByExample(example);

    }
}
